<?php  
	namespace Account\Model;
	use Think\Model;
	class UserAccountModel extends Model{
		protected $_map = array(
			"mingzi" => "username",
			"mima" => "password",
			"shenfenzheng" => "id_card",
			"shouji" => "tel"
		);
		protected $_validate = array(
			array('username','','用户名重复...!',0,'unique',4),
			array('username','/^[a-zA-Z]\w{6,16}$/','用户名格式有误...!',0,'regex',0),
			array('password','/^\w{6,16}$/','密码格式有误...!',0,'regex',0),
			array('password','querenmima','密码不一致...!',0,'confirm',4),
			array('password','querenmima','密码不一致...!',0,'confirm',6),
			array('id_card','/^[1-6]\d{5}(19\d{2}|20(0[\d]|1[0-7]))(0[0-9]|1[0-2])([0-2]\d|3[01])(\d{4}|\d{3}[xX])$/','身份证格式有误...!',0,'regex',0),
			array('tel','/^1[34578]\d{9}$/','身份证格式有误...!',0,'regex',0),

		);
		protected $_auto = array(
			array('password','PWmd5',3,'function'),
			// array('password','PWmd5',3,'function'),
			array('timedate','time',4,'function'),
		);
	}
?>